
#include "BallGame.h"

void BallGame::onRender(){

	//Imprime o background
	SDL_FillRect(displaySurface,NULL, SDL_MapRGB(displaySurface->format, 0, 0, 0)); 

	//Textos
	for(unsigned int i=0; i< Texto::textList.size(); i++)
		Texto::textList[i]->onRender(displaySurface);

	for(unsigned int i=0; i< CEntity::entityList.size() && i!= ITEM_INDEX; i++) //Nao chama CItem::onRender
		if(CEntity::entityList[i])
			CEntity::entityList[i]->onRender(displaySurface);

	level.onRender(displaySurface);

	CEntity::entityList[ITEM_INDEX]->onRender(displaySurface);

	SDL_Flip(displaySurface);
}